package com.ruoyi.common.enums;

import lombok.Getter;

@Getter
public enum EnterpriseStatusEnum {
    ENTERPRISE_APPLICATION("待管理员审核" ,"ENTERPRISE_APPLICATION") ,
    ENTERPRISE_APPLICATION_FAILURE("申请失败" ,"ENTERPRISE_APPLICATION_FAILURE") ,
    ENTERPRISE_ONLINE("正常使用" ,"ENTERPRISE_ONLINE") ,
    ENTERPRISE_OFFLINE("停止使用" ,"ENTERPRISE_OFFLINE") ;

    private String name ;

    private String code ;

    EnterpriseStatusEnum(String name ,String code) {
        this.name = name ;
        this.code = code ;
    }

    public static String getStatusName(String code) {
        for (EnterpriseStatusEnum value : values()) {
            if (code.equals(value.getCode())) {
                return value.getName() ;
            }
        }
        return "未知" ;
    }

}
